﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Register : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
      LoadDDLYearOfBirth();
    }

    public void LoadDDLYearOfBirth()
    {
      DropDownList _loadDDLYearOfBirth = (DropDownList)CreateUserWizardStep1.ContentTemplateContainer.FindControl("DDLYearOfBirth");

      for (int i = 0; i >= -100; i--)
        {
          _loadDDLYearOfBirth.Items.Add(System.DateTime.Now.AddYears(i).Year.ToString());
        }
    }

    protected void CreateUserWizardRegister_CreatingUser(object sender, LoginCancelEventArgs e)
    {
      CreateUserWizard cuw = (CreateUserWizard)sender;
      cuw.Email = cuw.UserName;
    }

    protected void CreateUserWizardRegister_CreatedUser(object sender, EventArgs e)
    {
      PnlRegistrationOptions.Visible = false;
    }
}